package com.x.provider.api.oss.service;

import com.x.core.web.api.R;
import com.x.provider.api.oss.constants.ServiceNameConstants;
import com.x.provider.api.oss.model.dto.green.AddGreenNotifyRequestDTO;
import com.x.provider.api.oss.model.dto.green.GreenRequestDTO;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

@FeignClient(contextId = "greenService", value = ServiceNameConstants.OSS_SERVICE)
public interface GreenRpcService {

    @PostMapping(ServiceNameConstants.OSS_RPC_URL_PREFIX + "/green/sync")
    R<String> greenSync(@RequestBody GreenRequestDTO greenAO);

    @PostMapping(ServiceNameConstants.OSS_RPC_URL_PREFIX + "/content/green/async")
    R<Void> addGreenNotifyAsync(@RequestBody AddGreenNotifyRequestDTO addGreenNotifyRequestDTO);
}
